$(function () {
	$.extend($.fn.validatebox.defaults.rules, {
		equals: {
			validator: function(value,param){
				return value == $(param[0]).val();
			},
			message: 'new passwords do not match.'
		}
	});



});

function submitForm(){
	var isValid = $('#ff').form('validate');
	if (isValid){
		//$('#ff').form('submit');
		$.post("changepassword", $("#ff").serialize(),
			function(data){
			$.messager.progress('close');
			$.messager.alert('Info', data, 'info');
		});
	}
	return isValid;
}

function resetForm(){
	$('#ff').form('clear');
}